🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / common / src / androidMain / kotlin / org / meshtastic / core / common / util / ExceptionsAndroid.kt
Displaying Raw • Download
core/common/src/androidMain/kotlin/org/meshtastic/core/common/util/ExceptionsAndroid.kt 0a44b948ec0573dc62ec68c19e46e62d40fcd1a3 (0a44b948) Text, 1.30 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.util
Tff7b72import T7ee787android.os.RemoteException
Tff7b72import T7ee787co.touchlab.kermit.Logger
T8b949e/**
* Wraps an operation and converts any thrown exceptions into [RemoteException] for safe return through an AIDL
* interface.
*/
Tff7b72fun Tff7b72<Te6edf3TTff7b72> Td2a8fftoRemoteExceptionsTb4b4b4(Te6edf3innerTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Te6edf3TTb4b4b4)Tb4b4b4: Te6edf3T Tff7b72= Tff7b72try Tb4b4b4{
Te6edf3innerTb4b4b4(Tb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffTooGenericExceptionCaughtTa5d6ff"Tb4b4b4) Te6edf3exTb4b4b4: Te6edf3ExceptionTb4b4b4) Tb4b4b4{
Te6edf3LoggerTb4b4b4.Te6edf3eTb4b4b4(Te6edf3exTb4b4b4) Tb4b4b4{ Ta5d6ff"Ta5d6ffUncaught exception in service call, returning RemoteException to clientTa5d6ff" Tb4b4b4}
Tff7b72when Tb4b4b4(Te6edf3exTb4b4b4) Tb4b4b4{
Tff7b72is Te6edf3RemoteException Tff7b72-Tff7b72> Tff7b72throw Te6edf3ex
Tff7b72else Tff7b72-Tff7b72> Tff7b72throw Te6edf3RemoteExceptionTb4b4b4(Te6edf3exTb4b4b4.Te6edf3messageTb4b4b4)Tb4b4b4.Te6edf3apply Tb4b4b4{ Te6edf3initCauseTb4b4b4(Te6edf3exTb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s